package com.scujj.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@TableName("jjbb_goods")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class Goods implements Serializable {
    @TableId("id")
    @JsonSerialize(using= ToStringSerializer.class)
    private Long id;
    @JsonSerialize(using= ToStringSerializer.class)
    private Long uid;
    @TableField(exist = false)
    private User user;
    private String name;
    private Integer number;
    @JsonSerialize(using= ToStringSerializer.class)
    private Long price;
    private String describes;
    private String imgSrc;
    private Date startTime;
    @TableField(exist = false)
    private List<OrderGoods> orderGoodsList;
    private Integer status;
}
